package cn.yitun.chat.yitunserverimapicore.business.contact.service;

import cn.yitun.chat.yituncommonmessage.result.ResultMessage;
import cn.yitun.chat.yitunservercommonlib.crud.yitun.CrudService;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.contact.ContactRelationDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.contact.ContactRelationInfo;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.contact.ContactRelationVo;

import java.util.List;

/**
 * 
 * Date 2019-01-20 14:15:38<br>
 * Description
 *
 * @author yitun<br>
 * @version 1.1
 */
public interface ContactRelationService
		extends CrudService<ContactRelationDto, ContactRelationInfo, ContactRelationVo>{


	/**
	 * 
	 * Date 2019-01-20 17:31:47<br>
	 * Description 获取所属用户的联系人分组列表
	 * 
	 * @param ownerUserId
	 * @return
	 * @author yitun<br>
	 * @version 1.1
	 */
	List<ContactRelationVo> getListByOwnerUserId(Long ownerUserId) ;

	ContactRelationVo getByContactUserId(ContactRelationDto query);

	List<ContactRelationVo> getListByContactUserId(Long ownerUserId, Long contactUserId);

	/**
	 * 
	 * Date 2019-01-20 14:15:50<br>
	 * Description 移动好友到其它分组
	 * 
	 * @param query
	 * @return
	 * @author yitun<br>
	 * @version 1.1
	 */
	ResultMessage moveCategory(Long key,
							   ContactRelationDto query);

	/**
	 * 
	 * Date 2019-01-20 14:17:03<br>
	 * Description 修改好友备注
	 * 
	 * @param query
	 * @return
	 * @author yitun<br>
	 * @version 1.1
	 */
	ResultMessage updateRemark(Long key, ContactRelationDto query);

	/**
	 * 
	 * Date 2019-01-20 14:18:20<br>
	 * Description 删除好友
	 * 
	 * @param query
	 * @return
	 * @author yitun<br>
	 * @version 1.1
	 */
	ResultMessage delete(Long key, ContactRelationDto query);

	ResultMessage updateBlocked(Long key, ContactRelationDto query);

	ContactRelationVo getVOById(Long ownerUserId, Long relationId);

	/**
	 * 联系人 计数
	 */
    int countByOwnerUserId(Long ownerUserId);
}
